3.1.68 \(\int (\frac {x^2}{\sin ^{\frac {3}{2}}(e+f x)}+x^2 \sqrt {\sin (e+f x)}) \, dx\) [68]

Optimal. Leaf size=62 \[ -\frac {16 E\left (\left .\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )\right |2\right )}{f^3}-\frac {2 x^2 \cos (e+f x)}{f \sqrt {\sin (e+f x)}}+\frac {8 x \sqrt {\sin (e+f x)}}{f^2} \]

[Out]

16*(sin(1/2*e+1/4*Pi+1/2*f*x)^2)^(1/2)/sin(1/2*e+1/4*Pi+1/2*f*x)*EllipticE(cos(1/2*e+1/4*Pi+1/2*f*x),2^(1/2))/
f^3-2*x^2*cos(f*x+e)/f/sin(f*x+e)^(1/2)+8*x*sin(f*x+e)^(1/2)/f^2

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.069, Rules used = {3397, 2719} \begin {gather*} -\frac {16 E\left (\left .\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )\right |2\right )}{f^3}+\frac {8 x \sqrt {\sin (e+f x)}}{f^2}-\frac {2 x^2 \cos (e+f x)}{f \sqrt {\sin (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[x^2/Sin[e + f*x]^(3/2) + x^2*Sqrt[Sin[e + f*x]],x]

[Out]

(-16*EllipticE[(e - Pi/2 + f*x)/2, 2])/f^3 - (2*x^2*Cos[e + f*x])/(f*Sqrt[Sin[e + f*x]]) + (8*x*Sqrt[Sin[e + f
*x]])/f^2

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 3397

Int[((c_.) + (d_.)*(x_))^(m_.)*((b_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(c + d*x)^m*Cos[e + f*x
]*((b*Sin[e + f*x])^(n + 1)/(b*f*(n + 1))), x] + (Dist[(n + 2)/(b^2*(n + 1)), Int[(c + d*x)^m*(b*Sin[e + f*x])
^(n + 2), x], x] + Dist[d^2*m*((m - 1)/(b^2*f^2*(n + 1)*(n + 2))), Int[(c + d*x)^(m - 2)*(b*Sin[e + f*x])^(n +
 2), x], x] - Simp[d*m*(c + d*x)^(m - 1)*((b*Sin[e + f*x])^(n + 2)/(b^2*f^2*(n + 1)*(n + 2))), x]) /; FreeQ[{b
, c, d, e, f}, x] && LtQ[n, -1] && NeQ[n, -2] && GtQ[m, 1]

Rubi steps

\begin {align*} \int \left (\frac {x^2}{\sin ^{\frac {3}{2}}(e+f x)}+x^2 \sqrt {\sin (e+f x)}\right ) \, dx &=\int \frac {x^2}{\sin ^{\frac {3}{2}}(e+f x)} \, dx+\int x^2 \sqrt {\sin (e+f x)} \, dx\\ &=-\frac {2 x^2 \cos (e+f x)}{f \sqrt {\sin (e+f x)}}+\frac {8 x \sqrt {\sin (e+f x)}}{f^2}-\frac {8 \int \sqrt {\sin (e+f x)} \, dx}{f^2}\\ &=-\frac {16 E\left (\left .\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )\right |2\right )}{f^3}-\frac {2 x^2 \cos (e+f x)}{f \sqrt {\sin (e+f x)}}+\frac {8 x \sqrt {\sin (e+f x)}}{f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.
time = 2.87, size = 185, normalized size = 2.98 \begin {gather*} \frac {8 e^{-i f x} \sqrt {2-2 e^{2 i (e+f x)}} \left (3 \, _2F_1\left (-\frac {1}{4},\frac {1}{2};\frac {3}{4};e^{2 i (e+f x)}\right )+e^{2 i f x} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};e^{2 i (e+f x)}\right )\right ) \sec (e)}{3 \sqrt {-i e^{-i (e+f x)} \left (-1+e^{2 i (e+f x)}\right )} f^3}-\frac {\sec (e) \left (\left (8+f^2 x^2\right ) \cos (f x)+\left (-8+f^2 x^2\right ) \cos (2 e+f x)-8 f x \cos (e) \sin (e+f x)\right )}{f^3 \sqrt {\sin (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[x^2/Sin[e + f*x]^(3/2) + x^2*Sqrt[Sin[e + f*x]],x]

[Out]

(8*Sqrt[2 - 2*E^((2*I)*(e + f*x))]*(3*Hypergeometric2F1[-1/4, 1/2, 3/4, E^((2*I)*(e + f*x))] + E^((2*I)*f*x)*H
ypergeometric2F1[1/2, 3/4, 7/4, E^((2*I)*(e + f*x))])*Sec[e])/(3*E^(I*f*x)*Sqrt[((-I)*(-1 + E^((2*I)*(e + f*x)
)))/E^(I*(e + f*x))]*f^3) - (Sec[e]*((8 + f^2*x^2)*Cos[f*x] + (-8 + f^2*x^2)*Cos[2*e + f*x] - 8*f*x*Cos[e]*Sin
[e + f*x]))/(f^3*Sqrt[Sin[e + f*x]])

________________________________________________________________________________________

Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \frac {x^{2}}{\sin \left (f x +e \right )^{\frac {3}{2}}}+x^{2} \left (\sqrt {\sin }\left (f x +e \right )\right )\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2/sin(f*x+e)^(3/2)+x^2*sin(f*x+e)^(1/2),x)

[Out]

int(x^2/sin(f*x+e)^(3/2)+x^2*sin(f*x+e)^(1/2),x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sin(f*x+e)^(3/2)+x^2*sin(f*x+e)^(1/2),x, algorithm="maxima")

[Out]

integrate(x^2*sqrt(sin(f*x + e)) + x^2/sin(f*x + e)^(3/2), x)

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sin(f*x+e)^(3/2)+x^2*sin(f*x+e)^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ha
s polynomial part)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} \left (\sin ^{2}{\left (e + f x \right )} + 1\right )}{\sin ^{\frac {3}{2}}{\left (e + f x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2/sin(f*x+e)**(3/2)+x**2*sin(f*x+e)**(1/2),x)

[Out]

Integral(x**2*(sin(e + f*x)**2 + 1)/sin(e + f*x)**(3/2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2/sin(f*x+e)^(3/2)+x^2*sin(f*x+e)^(1/2),x, algorithm="giac")

[Out]

integrate(x^2*sqrt(sin(f*x + e)) + x^2/sin(f*x + e)^(3/2), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int x^2\,\sqrt {\sin \left (e+f\,x\right )}+\frac {x^2}{{\sin \left (e+f\,x\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*sin(e + f*x)^(1/2) + x^2/sin(e + f*x)^(3/2),x)

[Out]

int(x^2*sin(e + f*x)^(1/2) + x^2/sin(e + f*x)^(3/2), x)

________________________________________________________________________________________